<template>
	<view class="joinorganization">
		<organizationVue :data="organizationData"></organizationVue>
	</view>
</template>

<script setup>
	import {
		ref,
		onMounted
	} from 'vue'
	import {
		getDictData,
		formatterDictData,
	} from '../../common/common.js'
	import organizationVue from '../../component/commonLayout/organization.vue';
	import uniReq from '../../api/index.js'
	const organizationData = ref([])
	const getOrganization = () => {
		uniReq({
			url: '/api/volunteer/teamjs/SelectTeamByUserId',
			method: 'GET',
			
		}, e => {
			if (e.success) {
				console.log('e-------------', e.data.records)
				organizationData.value = e.data.records
				organizationData.value.forEach((item) => {
					item.logo = JSON.parse(item.logo)
					item.organizationType = formatterDictData('DIC002', item.organizationType)
					
				})
				
			} else {
				uni.showToast({
					title: '获取组织信息失败',
					icon: 'none'
				})
			}
		})
	}
	onMounted(() => {

		getOrganization()
	})
</script>

<style lang="scss" scoped>
	
</style>